Fedora 10
Sponsored Link

Configure BIND
  Here is an example to configure BIND with named.conf. This example is done with grobal IP address [172.16.0.80/29], Private IP address [192.168.0.0/24], Domain name [srv.world]. However, Please use your own IPs and domain name when you set config on your server. ( Actually, [172.16.0.80/29] is for private IP address, though. )
[root@ns ~]#
vi /etc/named.conf


//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
# make it comment

#
listen-on port 53 { 127.0.0.1; };

# make it comment

#
listen-on-v6 port 53 { ::1; };

directory "/var/named";

dump-file "/var/named/data/cache_dump.db";

statistics-file "/var/named/data/named_stats.txt";

memstatistics-file "/var/named/data/named_mem_stats.txt";

# query range

allow-query { localhost;
192.168.0.0/24
; };

recursion yes;

# transfer range

allow-transfer { localhost; 192.168.0.0/24; };

# recursion range

allow-recursion { localhost; 192.168.0.0/24; };

};
logging {
channel default_debug {

file "data/named.run";

severity dynamic;

};

};
# change all from here

# here is the section for internal informations

view "internal" {
match-clients {

localhost;

192.168.0.0/24;

};

zone "." IN {

type hint;

file "named.ca";

};

# define your domain info for internal

zone "srv.world" IN {

type master;

file "srv.world.lan";

allow-update { none; };

};

# define your IP info for internal *note

zone "0.168.192.in-addr.arpa" IN {

type master;

file "0.168.192.db";

allow-update { none; };

};

zone "localhost.localdomain" IN {

type master;

file "named.localhost";

allow-update { none; };

};

zone "localhost" IN {

type master;

file "named.localhost";

allow-update { none; };

};

zone "1.0.0.127.in-addr.arpa" IN {

type master;

file "named.loopback";

allow-update { none; };

};

zone "0.in-addr.arpa" IN {

type master;

file "named.empty";

allow-update { none; };

};

};
# here is the section for external informations

view "external" {
match-clients {

any;

};

zone "." IN {

type hint;

file "named.ca";

};

# define your domain info for external

zone "srv.world" IN {

type master;

file "srv.world.wan";

allow-update { none; };

};

# define your IP info for external *note

zone "80.0.16.172.in-addr.arpa" IN {
type master;

file "80.0.16.172.db";

allow-update { none; };

};

};

# note: For How to write for reverse resolving, Write network address reversely like below

For 192.168.0.0/24
network address
⇒ 192.168.0.0

range of network
⇒ 192.168.0.0 - 192.168.0.255

how to write
⇒ 0.168.192.in-addr.arpa


For 172.16.0.80/29
network address
⇒ 172.16.0.80

range of network
⇒ 172.16.0.80 - 172.16.0.87

how to write
⇒ 80.0.16.172.in-addr.arpa